<?php require '../public/system/headers/headers.php';?>
<?php echo $this->headLink()->appendStylesheet($this->websiteUrl . '/system/css/seotoaster.css'); ?>
<?php echo $this->headLink()->appendStylesheet($this->websiteUrl . 'system/js/thickbox/thickbox.css'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl .'system/js/jquery/jquery.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/thickbox/thickbox.js'); ?>
<?php echo $this->headScript(); ?>
<script type="text/javascript">
$(document).ready(function(){
$('#selectcss').change(function(){
    var cssFileName = $('#selectcss option:selected').html();
    $('#csscode').ajaxStart(function(){    	
        $('#loading-css').show();
    })
    $.ajax({
        type: "post",
        url: '<?php echo $this->websiteUrl; ?>sys/backend_css/changecss',
        data: 'cssFileName='+ cssFileName,
        success: function(response) {
            $('#loading-css').hide();
            var newCssContent = eval('(' + response + ')');
            $('#csscode').val(newCssContent);
        }
    });
})
});
</script>
<div id="seotoaster" class="admineditcss">
<div class="admineditwhat">{%Edit CSS%}</div>
<?php if($this->errorMessage): ?>
	<div class="errors" onclick="this.style.display='none';"><?php echo $this->errorMessage; ?></div>
<?php else: ?>
	<?php if($this->successMessage): ?>
    	<div class="success" onclick="this.style.display='none';"><?php echo $this->successMessage; ?></div>
	<?php endif; ?>
	<div class="close_window" onclick="top.location.href='<?php echo $this->pageUrl;?>'; parent.tb_remove();"></div>   	
	<?php echo $this->form; ?>
	<!-- <button style="position:absolute;top:0px;left:0px;">{%Done%}</button> -->
<?php endif; ?>
	<input type="hidden" id="hid-main-wsurl" name="hid-main-wsurl" value="<?php echo $this->websiteUrl; ?>" />
<div class="success" id="loading-css" style="font-size:14px;display:none;">
		Loading css...
</div></div>